<template>


	<view class="content">
		<navigator url="../my-search/my-search">
			<view>

				<!-- 使用 view 组件模拟 input 输入框的样式 -->
				<view class="my-search-box">

					<view>
						<text class="text">今天又是元气满满一天的呀🙂</text>
					</view>
					<image class="icon" src="../../static/search.png"></image>

					<!-- 				  	  		   <button type="primary"  class="btn1">搜索订单</button>
 -->
				</view>
			</view>
		</navigator>



		<view v-for="(orderList,index) in supplierOrderList" :key="orderList.suId">
			<navigator url="../ddxiangqing/ddxiangqing" @click="snedSuId(orderList.suId)">

				<uni-card :title=orderList.suId extra="未完成">
					<text class="uni-body">
						支付单号：{{orderList.payOrder}}
						司机名字：{{orderList.sjName}}
						司机手机号：{{orderList.sjPhone}}
						下单时间： {{orderList.createTime}}
					</text>
				</uni-card>
			</navigator>
		</view>
	</view>


</template>


<script>
	import axios from 'axios';
	import config from '../../common/config';
	export default {

		data() {

			return {

				supplierOrderList: [],
			};
		},
		created() {
			this.getDataList()
		},
		onPullDownRefresh() {
			
			
			this.getDataList()
			uni.stopPullDownRefresh()
		},
		methods: {

			getDataList() {
				let id = uni.getStorageSync('ghId')
				axios.get(config.baseUrl + 'supplier/ssmsuorder/findSupplierOrder/' + id)
					.then((response) => {
						this.supplierOrderList = response.data.supplierOrderList
						console.log(response.data.supplierOrderList)
					})
			},
			snedSuId(suId) {
				// let suId=data.supplierOrderList.suId
				//console.log(suId)
				uni.setStorageSync('suId', suId)
			},

			search() {

				uni.reLaunch({
					url: '/pages/my-search/my-search'
				})

			}
		}
	}
</script>

<style lang="scss">
	.my-search-container {
		background-color: #1296db;
		height: 50px;
		padding: 0 10px;
		display: flex;
		align-items: center;
	}

	.my-search-box {
		height: 36px;
		background-color: beige;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;

		.placeholder {
			font-size: 15px;
			margin-left: 5px;
		}
	}

	.btn {
		margin-left: 550rpx;
		height: 80rpx;
	}

	.icon {

		width: 50rpx;
		height: 50rpx;
		margin-left: 150rpx;
	}

	.text {
		margin-left: 100rpx;
		font-size: 30rpx;
	}
</style>
